package service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import dao.CommentDao;
import entity.Comment;
import service.CommentService;

@Service
public class CommentServiceImpl implements CommentService {

	@Resource(name = "commentDao")
	private CommentDao commentDao;

	public CommentDao getCommentDao() {
		return commentDao;
	}

	public void setCommentDao(CommentDao commentDao) {
		this.commentDao = commentDao;
	}

	public List<Comment> findCommentsByEssayId(int id) {
		return commentDao.findCommentsByEssayId(id);
	}

	public void addComment(Comment comment) {
		commentDao.addComment(comment);
	}

}
